package com.v2.k26;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试@ComponentScan能不能扫描到@Bean的对象
 * 结论：
 * @ComponentScan 可以 扫描到@Bean的对象
 *
 */
public class Test {

	public static void main(String[] args) {

		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
		System.out.println(applicationContext.getBean("appConfig"));
		System.out.println(applicationContext.getBean(A.class));


	}

}
